1. Field of the Invention
The present invention relates to an image memory write control apparatus and a texture mapping apparatus incorporating this image memory write control apparatus. More particularly, the present invention relates to a novel-type image memory write control apparatus capable of writing data to a memory unit without interrupting the arithmetic operation of a linear interpolation operation unit (hereinafter referred to as a DDA), and to a texture mapping apparatus incorporating this novel-type image memory write control apparatus.
2. Description of the Relevant Art
In a graphic display apparatus, it is required to increase the capacity of the image memory unit with the entire cost decreased. Accordingly, a static random access memory unit (hereinafter referred to as a SRAM) is hardly used, but a dynamic random access memory unit (hereinafter referred to as a DRAM) is generally used.
However, when the DRAM is used as an image memory unit, the time required for accessing to the DRAM is about 230 to 400 nsec, although the DDA takes about 50 nsec for generating one-pixel data. It is therefore required that, while all necessary pixel data are written into the image memory unit, the arithmetic operation of the DDA is frequently interrupted. This disadvantageously increases the time required for writing pixel data to the image memory unit, resulting in considerable increase in time required for displaying the image.
To overcome such problem, a graphic display apparatus of the raster scanning type as shown in FIG. 16 is proposed, which apparatus includes:
buffer memories 72a, 72b for temporarily holding a predetermined number of pixel data along the scanning line supplied from a DDA 71,
an image memory unit 73 to which a predetermined number of pixel data are supplied from the buffer memories 72a, 72b; and
a timing control circuit 74 for controlling the changeover of the buffer memories 72a, 72b and for supplying a memory timing signal to the image memory unit 73.
The arrangement above-mentioned is hereinafter referred to as the double buffer method. In this double buffer method, there are available the following two methods:
(1) a 1.times.8 double buffer method by which only 8-pixel data in the scanning line direction are held; and PA0 (2) a 4.times.4 double buffer method by which held are 16-pixel data of 4 pixels in the scanning line direction for each of 4 pixels in a direction at a right angle thereto.
In either method as above-mentioned, it is possible to lower the frequency of interrupting the arithmetic operation of the DDA due to long access time required for accessing to the image memory unit 73. This enables improved speed at which pixel data are written into the image memory unit 73 as to the entire image to be displayed. This results in certain improvement in image display speed.
The following description will discuss in more detail both methods above-mentioned.
According to the double buffer method, while the DDA 71 supplies pixel data to one buffer memory, the other buffer memory supplies pixel data to the image memory unit 73. That is, even though pixel data are written to the image memory unit 73 by one buffer memory, This enables reducing the frequency of interrupting the arithmetic operation of the DDA 71. Consequently, this improves the speed at which pixel data are written into the image memory unit 73 as to the entire image.
Particularly, according to the 1.times.8 double buffer method, 8-pixel data in the scanning line direction which are successively supplied from the DDA 71, are temporarily held in either buffer memory alternately, and 8-pixel data are written into the image memory unit 73 from the buffer memory to which no pixel data are being supplied from the DDA 71. Accordingly, when carrying out an operation including the high probability that pixel data are continuous in the scanning direction as in a polygon filling operation, the time required for writing data into the image memory unit can be considerably shortened.
More specifically, even though the time required for writing data into the image memory unit 73 is eight times that required for generating pixel data by the DDA 71, the time required for writing data of each pixel is equal to the time required for generating data of each pixel by the DDA 71. It is therefore not required to interrupt the DDA 71, except for a refresh operation of the image memory unit 73, an operation for reading data from the image memory unit 73, and the like. This shortens the entire time required for writing data into the image memory unit 73.
However, when drawing a line segment inclined with respect to the scanning direction, the number of pixel data to be simultaneously written into the buffer memories is decreased. This inevitably causes the arithmetic operation of the DDA 71 to be interrupted for a relatively long period of time while data are being written into the image memory unit 73. This results in increase in entire time required for data writing.
More specifically, when drawing a line segment inclined, for example, at 45.degree. or more with respect to the scanning direction, only one pixel data are written during one cycle of writing data into the image memory unit 73 by the buffer memory concerned (See FIG. 17). It is therefore sufficient that the DDA 71 carries out an operation for one pixel data above-mentioned. Accordingly, even though the DDA 71 is capable of operating at a speed of eight times the speed at which data are written into the image memory unit 73, the DDA 71 is obliged to interrupt its arithmetic operation for the period of time during which the arithmetic operation would be carried out for the remaining seven pixel data (See FIG. 18).
In the 4.times.4 double buffer method, each buffer memory has a memory area for data of four pixels in each of the scanning line direction and a direction at right angle thereto. Accordingly, maximum four pixel data may be held not only in the scanning direction, but also in a direction inclined with respect thereto. In this connection, when there is used the DDA 71 capable of operating at a speed of four times the speed at which data are written into the image memory unit 73, the one-pixel data writing speed may be made substantially equal to the operating speed of the DDA 71.
However, when the positional relationship between a line segment to be drawn and the buffer memory is changed, there are instances where only two or one pixel data are written by one data writing into the image memory unit 73. In the former case, the DDA is obliged to interrupt its arithmetic operation for the period of time during which the arithmetic operation would be carried out for the remaining two pixel data, as shown in FIG. 20.
In summary, even though the DDA 71 is improved in operating speed or even though the buffer memories 72a, 72b are increased in capacity, the DDA 71 may be inevitably obliged to interrupt its arithmetic operation, dependent on the conditions of lines to be drawn. This results in considerable variations of the time required for writing, into the image memory unit 73, pixel data for line segments inclined at an arbitrary angle with respect to the scanning direction.
There has been increased demand for design or image effects made by projecting a desired area of a figure previously supplied from an image input device, or a figure drawn by a figure drawing device, on the surface of a desired solid figure. To satisfy such demand, there has been provided texture mapping apparatus for projecting and displaying a desired two-dimensional figure on a desired three-dimensional figure.
There is known a texture mapping apparatus in which a two-dimensional figure to be mapped (hereinafter referred to as a texture original figure) is divided in line segments in the scanning line direction, and the line segments thus obtained are subjected to an inverse perspective transformation for each pixel while the line segments are being scanned on the plane in which the figure to be visually displayed is defined (hereinafter referred to as the display plane) in the scanning line direction ("What is the Texture Mapping (1)", in the Collection of Lectures and Theses [III]by Takeshi SHIBAMOTO and Makoto KOBAYASHI, Association of Data Processing, Published in Sept. 9, 1985).
In the texture mapping apparatus arranged as abovementioned, it is required to carry out a matrix operation for each pixel, creating a problem of slow processing speed and necessity for additional memory. Further, accurate mapping cannot be always achieved dependent on the combination of unit polygons constituting a texture original figure with unit polygons constituting a figure on the display plane. More specifically, the texture original figure and the figure on the display plane is crushed into unit polygons (for example triangles). Between corresponding triangles, mapping from one triangle to another triangle is performed by carrying out matrix operation. But matching between the neighboring triangles may go wrong, and as a result inaccurate mapping may be achieved. This disadvantageously presents deterioration in quality of figure data displayed on the display plane.
To overcome the problems above-mentioned, the inventor has proposed a texture mapping apparatus (U.S. Pat. Application Ser. No. 410,017 which is a continuation of Ser. No. 100,677, which is abandoned), the outline of which is set forth below.
Two opposite sides on a display-side unit polygon area are linearly interpolated, and two opposite sides on a texture-side unit polygon area are linearly interpolated, and the line segments determined based on the linear interpolation data obtained by the operations above-mentioned are synchronously interpolated. Based on the address data obtained by the line-segment interpolation operation at the texture side, data are read out from the mapping memory and supplied to the display plane. Accordingly, no additional memories are required and mapping figure of high quality may be displayed at a high speed.
However, this texture mapping apparatus is not still capable of achieving the operation at the desired higher speed, and needs to be further improved.
The following description will discuss in detail the points to be improved.
To draw, at a high speed, a vector oriented to an arbitrary direction (hereinafter referred to as a random vector) in a graphic display apparatus, the image memory unit has to have capacity greater than the capacity necessary for actual display. For example, when only 1280.times.1024 pixels are to be displayed, the use of five 256K-bit DRAMs may provide a sufficient memory area. However, since the bit width of each DRAM is four, the 20-bit width is merely obtained as a whole. Further, the number of DRAMs is five, and this number cannot be expressed in terms of involution of 2. This fails to achieve data input/output at a sufficiently high speed. Further, when the capacity of the image memory unit is set to 2048.times.1024 pixels, the memory area necessary for these pixels is provided by eight DRAMs. The entire bit width becomes 32, and the number of the DRAMs may be expressed in terms of involution of 2. This enables data input/output at a sufficiently high speed. However, the latter case inevitably produces a vacant area for 768.times.1024 pixels. When this vacant area is used as a texture mapping memory area, the necessity for additional memories is eliminated. This provides a great advantage in view of simplification of the arrangement.
In the texture mapping apparatus above-mentioned proposed by the inventor, however, mapping of one pixel requires access to be made to different addresses in the image memory unit. Accordingly, even though the linear interpolation operation unit operates at a high speed, much time is required for access to the image memory unit. As a whole, the texture mapping speed is not improved so much.